package com.wn.date20190814linkedList;

import com.wn.date20190814.User;

public class LinkedeTest
{

	public static void main(String[] args)
	{
		LinkedList link=new LinkedList();
		link.add(new User("aaa"));
		link.add(new User("bbb"));
		link.add(new User("ccc"));
		link.add(new User("ddd"));
		link.forEach(System.out::println);
		link.remove(0);
		System.out.println();
		link.forEach(System.out::println);
		System.out.println("\n首："+link.getFirst()+"\n尾:"+link.getLast());
		System.out.println(link.get(4));
	}

}
